import VueRouter from 'vue-router';
import Home from './components/tabbar/Home.vue';
import NewsList from './components/news/NewsList.vue';
import AboutMe from './components/aboutMe/AboutMe.vue';
import ShoppingCart from './components/shoppingCart/ShoppingCart.vue';
import NewsInfo from './components/news/NewsInfo.vue';
import GoodsList from './components/goods/GoodsList.vue';
import GoodsInfo from './components/goods/GoodsInfo.vue';

const router = new VueRouter({
  routes: [
    { path: '/',redirect: '/home' },
    { path: '/home',component: Home },
    { path: '/home/news-list',component: NewsList },
    { path: '/about-me', component: AboutMe},
    { path:'/shopping-cart', component: ShoppingCart },
    { path: '/home/news/news-info/:id', component: NewsInfo},
    { path: '/home/goods-List', component: GoodsList},
    { path: '/home/goods-info/:id', component: GoodsInfo},
  ]
})

export default router;